import React from 'react'
import Meal from './Meal/Meal'
import classes from './Meals.module.css'
import Cart from './Cart/Cart'

function Meals(props) {
  return (
    <div className={classes.meals}>
        {props.mealsData.map(item => 
          {return <Meal meal={item} 
            addMealHandler={props.addMealHandler}
            subMealHandler={props.subMealHandler}
          />})
        }
        <Cart/>
    </div>
  )
}

export default Meals